import type { IntercityOrderDetail } from '@/types/api'

interface FetchIntercityOrderDetailAPIResData {
  code: number
  msg: string
  time: string
  data: IntercityOrderDetail
}

interface FetchIntercityOrderDetailAPIParams {
  id: string
}

export function fetchIntercityOrderDetailAPI(params: FetchIntercityOrderDetailAPIParams, token: string) {
  return httpInstance.get<FetchIntercityOrderDetailAPIResData, FetchIntercityOrderDetailAPIParams>(
    '/api/intercity/orderdetail',
    { params, headers: { token } },
  )
}
